package com.shoulder.boot.system.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.shoulder.core.api.ApiDelete;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * 部门信息
 *
 * @author 596767880@qq.com
 * @since 2024-01-05 21:10:37
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("dept")
public class Dept extends ApiDelete {

    /**
     * 部门名称
     */
    @TableField("name")
    private String name;
    /**
     * 所属租户
     */
    @TableField("tenant_id")
    private String tenantId;
    /**
     * 上级部门id
     */
    @TableField("parent_id")
    private String parentId;

    /**
     * 子集
     */
    @TableField(exist = false)
    @JsonInclude(value = JsonInclude.Include.NON_EMPTY)
    private List<Dept> children;

}
